Cognitoware.Robotics.dll
Class VectorRange<V>
V: A type derived from Vector.
System.Object
Cognitoware.Mathematics.Data.VectorRange<V>
Summary
Defines minimum and maximum values for fields in a Vector type.
Constructor Summary
Creates a range with the specified minimum and maximum values.
Method Summary
Equals(Object)
Inherited from System.Object
Finalize()
Inherited from System.Object
GetHashCode()
Inherited from System.Object
GetType()
Inherited from System.Object
MemberwiseClone()
Inherited from System.Object
Creates a random value that is uniformly selection from the range.
Creates a string representation of the VectorRange.
Details
Defines minimum and maximum values for fields in a Vector type.
Once created, the minimum and maximum of the range cannnot be changed.
The values are not validated to ensure that all values in the minimum are less than the coresponding value in maximum.
This class is used to define bin ranges in histograms.
Constructor Details
public VectorRange(V min, V max)
Creates a range with the specified minimum and maximum values.
Parameters:
min
- The minimum values in the range.
max
- The maximum values in the range.
Method Details
public V Sample(Random select)
Creates a new object of type V and initializes it with random values between
min and max. Each value between min and max has an equal probability of being selected.
Parameters:
select
- A random number generator used to generate the sample.
Returns:
A vector value where each element is contained in the range defined by min and max.
public override String ToString()
Creates a string representation of the VectorRange.
Returns:
A string representation of the VectorRange